import {
    createRouter,
    createWebHashHistory,
    RouteRecorRaw
} from 'vue-router'

import Home from "@/pages/home.vue"
import Index from "@/pages/index.vue"

const routes:Array<RouteRecorRaw> = [
      {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/index',
    name: 'Index',
    component: Index
  },
  {
    path: '/axios',
    name: 'Axios',
    component: () => import('@/pages/axios.vue') // 懒加载组件
  }
]
const router = createRouter({
    history:createWebHashHistory(),
    routes
})

export default router;